<?php

namespace app\wap\controller;

use app\admin\model\goods\GoodsServer;
use app\wap\model\Category;

class Goods extends Base
{


    public function detail(){


        $info=\app\wap\model\Goods::GoodsDetail();

        $server=GoodsServer::whereIn('id',$info->server_id_json)->select();



        return view('',['info'=>$info,'sever'=>$server]);
    }

    public function product(){

        $where['status']=1;
        $where['store_id']=SID;
        $cate=Category::where($where)->field('id,name,parent_id,sort,status')->order('sort asc')->select();

        $goods=Category::GetGoodsList();




        return view('',['cate_list'=>$cate,'goods'=>$goods->toArray()]);
    }

}